package com.bailian.spring.ioc.basic_di.di_anno;

import com.bailian.spring.ioc.basic_di.di_anno.bean.Red;
import com.bailian.spring.ioc.basic_di.di_anno.config.BasicDiAnnoConfiguration;
import com.bailian.spring.ioc.basic_di.di_anno.bean.Black;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author gaoxu
 * date: Created on 2021/10/29 下午2:30
 */
public class AnnoValueApplication {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(BasicDiAnnoConfiguration.class);
        Black black = ctx.getBean(Black.class);
        System.out.println(black);

        Red red = ctx.getBean(Red.class);
        System.out.println(red);
    }
}
